package com.realgodo.site.entity.vocation;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.realgodo.site.entity.IdEntity;

/**
 * 职业 属于系统级别的 由后台管理员维护 目前需求只有二级
 * 
 * @author bijiqiang E-mail: bijiqiang@gmail.com
 * @version 创建时间：2009-12-12下午10:43:10
 * @since jdk1.5
 * @version 0.1
 */
@Entity(name = "Vocation")
@Table(name = "vocation")
public class Vocation extends IdEntity {

	private static final long serialVersionUID = 7683851729520162717L;

	private Vocation parent;
	/** 图片存储地址 */
	private String path;

	private String chName;

	private String enName;
	
	/**transient 是否被选中*/
	private boolean checked;
	
	/**transient 有多少用户**/
	private Long count;

	@ManyToOne
	@JoinColumn(name = "parent_id", referencedColumnName = "id", nullable = true)
	public Vocation getParent() {
		return parent;
	}

	public void setParent(Vocation parent) {
		this.parent = parent;
	}

	@Column(name = "ch_name", insertable = true, updatable = true)
	public String getChName() {
		return chName;
	}

	public void setChName(String chName) {
		this.chName = chName;
	}

	@Column(name = "en_name", insertable = true, updatable = true)
	public String getEnName() {
		return enName;
	}

	public void setEnName(String enName) {
		this.enName = enName;
	}

	@Column(name = "path", insertable = true, updatable = true)
	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	@Transient
	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}
	
	@Transient
	public Long getCount() {
		return count;
	}

	public void setCount(Long count) {
		this.count = count;
	}

	
	
}
